package com.example.lenovo.test01.listview;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.example.lenovo.test01.R;

import org.w3c.dom.Text;

public class edittext extends AppCompatActivity {

    public EditText et;
    public TextView tv;
    private Button btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_edittext);

        et.findViewById(R.id.et);
        String inputtext = et.getText().toString();
        tv = findViewById(R.id.tv1);
        tv.setText(inputtext);
        btn = findViewById(R.id.et_return);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(edittext.this,List.class);
                startActivity(intent);
            }
        });
    }
}
